package com.graduate.front.mapper;

import org.apache.pdfbox.io.RandomAccessFile;
import org.apache.pdfbox.pdfparser.PDFParser;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;


/**
 * @author bwzfy
 * @create 2021/5/11
 **/
public class Test {
    public static void main(String[] args) throws IOException {
        // public RandomAccessFile(File file, String mode)
        PDFParser p = new PDFParser(new RandomAccessFile(new File("E:\\苦逼日子\\毕设\\11.pdf"), "rw"));
        p.parse();
        System.out.println(p.getPDDocument().getNumberOfPages());
    }
}
